//
//  animation.h
//  Sinnca Engine v2
//
//  Created by Ryan Oldis on 10/25/11.
//  Copyright (c) 2011 Sinnca Studios. All rights reserved.
//

#include "global.h"

#ifndef Sinnca_Engine_v2_animation_h
#define Sinnca_Engine_v2_animation_h

struct keyframe
{
	// not sure what goes in here yet...
	// should I just put every keyable variable in here?
	
	int texco[4];
	
};

class animation
{
	bool playing;
	int currentFrame;
	
	std::string name;
	
public:
	
	animation(std::string n);
	
	std::vector<keyframe> timeline;
	
	
	void pause();
	void play();
	void gotoFrame(int f);
	
};

animation* checkAni(lua_State* L, int ind);

static int newAnimation(lua_State* L);
static int newFrame(lua_State*L);

void registerAnimation(lua_State* L);

#endif
